from django.contrib import admin
from django.contrib.auth.admin import UserAdmin
from django.utils.translation import gettext_lazy

from .models import User, Comment, Upload


@admin.register(User)
class UserProfileAdmin(UserAdmin):
    list_display = ['name', 'username', "text", 'vip']
    list_per_page = 10
    fieldsets = (
        (None, {'fields': ('username', 'password')}),
        (gettext_lazy('Personal info'), {'fields': ('name', 'text', 'vip', 'b1', 'b2', 'b3')}),
        (gettext_lazy('Permissions'), {
            'fields': ('is_staff', 'is_superuser'),
        }),
    )
    add_fieldsets = (
        (None, {u'fields': ('username', 'password1', 'password2')}),
        (gettext_lazy('Personal info'), {'fields': ('name', 'text', 'vip', 'b1', 'b2', 'b3')}),
    )


@admin.register(Comment)
class CommentAdmin(admin.ModelAdmin):
    pass


@admin.register(Upload)
class UploadAdmin(admin.ModelAdmin):
    pass
